GCC := arm-linux-gnueabihf-
CC := $(GCC)gcc -Wall -nostdlib -c -O2 -o

objs := start.o main.o

led.bin : $(objs)
	$(GCC)ld -Timx6ull.lds -o led.elf $^
	$(GCC)objcopy -O binary -S led.elf $@
	$(GCC)objdump -D -m arm led.elf > led.dis

%.o : %.c
	$(CC) $@ $<
%.o : %.s
	$(CC) $@ $<

clean:
	rm -rf *.o led.bin led.elf led.dis